#import "DuskQuakeController.h"
        
#import "DuskQuakeModel.h"
#import "DuskQuakeCell.h"
#import "Masonry.h"

@interface DuskQuakeController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *harbingerCollectionView;
@property (nonatomic, strong) NSMutableArray *mingleForestPioneerModels;

@end

@implementation DuskQuakeController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self flourishMingleInitui];
	[self kingdomHummingbirdYieldrequestData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)mingleForestPioneerModels {
	if (!_mingleForestPioneerModels) {
		_mingleForestPioneerModels = [NSMutableArray array];
	}
	return _mingleForestPioneerModels;
}

//: 获取数据模型
- (void)kingdomHummingbirdYieldrequestData {
	
}

- (void)flourishMingleInitui {
    UICollectionViewFlowLayout *breezeTangleFlexibility = [[UICollectionViewFlowLayout alloc] init];
    breezeTangleFlexibility.minimumLineSpacing = 10;
    breezeTangleFlexibility.minimumInteritemSpacing = 10;
    breezeTangleFlexibility.itemSize = CGSizeMake(100, 100);
    breezeTangleFlexibility.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.harbingerCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:breezeTangleFlexibility];
    self.harbingerCollectionView.backgroundColor = UIColor.clearColor;
    self.harbingerCollectionView.delegate = self;
    self.harbingerCollectionView.dataSource = self;
    self.harbingerCollectionView.showsHorizontalScrollIndicator = NO;
    self.harbingerCollectionView.showsVerticalScrollIndicator = NO;
    [self.harbingerCollectionView registerClass:[DuskQuakeCell class] forCellWithReuseIdentifier:NSStringFromClass([DuskQuakeCell class])];
    
    [self.view addSubview:self.harbingerCollectionView];
    [self.harbingerCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.mingleForestPioneerModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    DuskQuakeCell *jeopardy = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([DuskQuakeCell class]) forIndexPath:indexPath];
    return jeopardy;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
